<template>
  <div class="user">
    <PageHeader 
      :formConfig='formConfig'
      @selectClick="handleSelectClick"
      @resetClick="handleResetClick"/>

    <PageContent  
      :tableConfig="tableConfig"
      tableName="checks" 
      ref="pageContentRef"
      @createClick="handleCreateClick"
      @editeClick="handleEditeClick"
      />

    <PageDialog
      ref="pageDialogRef"
      tableName="checks" 
      :dialogConfig="dialogConfig"
      :editeData="editeData"
    />

  </div>
</template>

<script setup lang="ts">

import PageHeader from '@/components/page-header/PageHeader.vue';
import PageContent from '@/components/page-content/PageContent.vue';
import PageDialog from '@/components/page-dialog/PageDialog.vue';

import { formConfig } from './config//form-config'
import { tableConfig } from './config/table-config'
import { dialogConfig } from './config/dialog-config'


import useSearch from '@/hooks/useSearch';
import useDialog from '@/hooks/useDialog'


const [handleSelectClick,handleResetClick,pageContentRef] = useSearch()

const [pageDialogRef, editeData,handleCreateClick,handleEditeClick] = useDialog()

</script>

<style scoped>

</style>